<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@taglib uri="http://www.springframework.org/tags" prefix="spring"%>
<html>
	<head>
		<base target="_self" />
		<meta http-equiv="pragma" content="no-cache">
        <meta http-equiv="cache-control" content="no-cache">
        <meta http-equiv="expires" content="0">
		<title>添加用户</title>
		<link rel="stylesheet" type="text/css" href="<c:url value="/static/jquery-easyui/themes/default/easyui.css"/>">
		<link rel="stylesheet" type="text/css"
			href="<c:url value="/static/jquery-easyui/themes/icon.css"/>">
		<script type="text/javascript"
			src="<c:url value="/static/jquery-easyui/jquery-1.6.min.js"/>"></script>
		<script type="text/javascript"
			src="<c:url value="/static/jquery-easyui/jquery.easyui.min.js"/>"></script>
		<script type="text/javascript"
			src="<c:url value="/static/jquery-easyui/plugins/jquery.panel.js"/>"></script>
		<script type="text/javascript"
			src="<c:url value="/static/jquery-easyui/plugins/jquery.datagrid.js"/>"></script>
		<script type="text/javascript"
			src="<c:url value="/static/jquery-easyui/plugins/jquery.messager.js"/>"></script>
		<script type="text/javascript"
			src="<c:url value="/static/jquery-easyui/ext-for-framework.js.jsp"/>"></script>
		<script type="text/javascript" src="<c:url value="/static/jquery-easyui/locale/easyui-lang-zh_CN.js"/>"></script>		

<%
	String codeTypeId = new String(request.getParameter("codeTypeId").getBytes("ISO-8859-1"),"gb2312");
	String codeTypeName = new String(request.getParameter("codeTypeName").getBytes("ISO-8859-1"),"gb2312");
	String describ = new String(request.getParameter("describ").getBytes("ISO-8859-1"),"gb2312");
	System.out.println(describ+"---");
%>

    <script type="text/javascript">
    	//修改配置信息按钮响应函数
		function updateCode(){
			
			$('#UpdateCodeForm').form('submit',
			{
				url:'<c:url value='/datadictionary/updateCodeType.do'/>', //查询提交路径
				onSubmit:function()//提交按钮相应函数
				{
					return $('#UpdateCodeForm').form('validate');
				},
				success:function(data){
					if(typeof(JSON)=='false'){
						data = eval('(' + data + ')');
					}else{
               			data = JSON.parse(data);
            		}
            		
	       			if(data.success){
	       				$.messager.alert("提示", "修改成功！", 'info');
       				}else{
	       				$.messager.alert("提示", data.msg, 'warning');
       				}
				},
				error:function(){
					$.messager.alert("错误", "系统错误，请联系管理员！", 'error');
					return;
				}
			});
			
		}
    </script>
    <!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
  </head>

  <body>
    <table width="90%" align="center">
	  <tr></tr>
	  <tr>
		<td>
		
		  <div style="height: auto; background: #fafafa; padding: 5px;" class="easyui-panel" title="修改配置信息" iconCls="icon-edit" 
		  collapsible="true" minimizable="false" maximizable="false" closable="false">
			
			<form id="UpdateCodeForm" name="UpdateCodeForm" method="post">
			  <ul>
			    <li>
			      <label for="codeTypeId">配置类型名称：</label>
				  <input class="easyui-validatebox" type="text" name="codeTypeId" value=<%=codeTypeId %> readonly/>
			    </li> <br>
			    <li>
			      <label for="codeTypeName">配置编码：</label>
				  <input class="easyui-validatebox" type="text" name="codeTypeName" value=<%=codeTypeName %> />
			    </li> <br>
			    <li>
			      <label for="describ">配置名称：</label>
				  <input class="easyui-validatebox" type="text" name="describ" value=<%=describ %> />
			    </li> <br>
			    <li>

		          <a class="easyui-linkbutton" onclick="updateCode()">修改</a>
			    </li> <br>
			  </ul>
			</form>
		  
		  </div>
		</td>
	  </tr>
	</table>
  </body>
</html>